﻿<CodeSnippetTabbed DocLink="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxChart-1#labels">
    <CodeSnippetTabPage Text="Razor">@(@"<DxChart Data=""@WeatherForecasts""
         CustomizeSeriesPoint=""@PreparePointLabel""
         CssClass=""mw-1100"">
    <DxChartLineSeries AggregationMethod=""@(i => (int)i.Average())""
                       ValueField=""@((WeatherForecast i) => i.TemperatureF)""
                       ArgumentField=""@(i => i.Date.Date)""
                       Name=""Temperature, F"">
        <DxChartSeriesLabel Position=""RelativePosition.Outside"">
            <DxChartSeriesLabelConnector Visible=""true"" Width=""3"" />
        </DxChartSeriesLabel>
    </DxChartLineSeries>
    <DxChartLegend Position=""RelativePosition.Outside"" />
</DxChart>

@code {
    WeatherForecast[] WeatherForecasts;

    protected void PreparePointLabel(ChartSeriesPointCustomizationSettings pointSettings)
    {
        double value = (double)pointSettings.Point.Value;
        if(value > 25 && value < 75)
            pointSettings.PointLabel.Visible = true;
    }
}")</CodeSnippetTabPage>
</CodeSnippetTabbed>
